using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Data_DownLoadMission_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Data.DownLoadMission);

            field = type.GetField("cmd", flag);
            app.RegisterCLRFieldGetter(field, get_cmd_0);
            app.RegisterCLRFieldSetter(field, set_cmd_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_cmd_0, AssignFromStack_cmd_0);
            field = type.GetField("DataContext", flag);
            app.RegisterCLRFieldGetter(field, get_DataContext_1);
            app.RegisterCLRFieldSetter(field, set_DataContext_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_DataContext_1, AssignFromStack_DataContext_1);
            field = type.GetField("result", flag);
            app.RegisterCLRFieldGetter(field, get_result_2);
            app.RegisterCLRFieldSetter(field, set_result_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_result_2, AssignFromStack_result_2);
            field = type.GetField("type", flag);
            app.RegisterCLRFieldGetter(field, get_type_3);
            app.RegisterCLRFieldSetter(field, set_type_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_type_3, AssignFromStack_type_3);
            field = type.GetField("filename", flag);
            app.RegisterCLRFieldGetter(field, get_filename_4);
            app.RegisterCLRFieldSetter(field, set_filename_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_filename_4, AssignFromStack_filename_4);
            field = type.GetField("url", flag);
            app.RegisterCLRFieldGetter(field, get_url_5);
            app.RegisterCLRFieldSetter(field, set_url_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_url_5, AssignFromStack_url_5);
            field = type.GetField("err", flag);
            app.RegisterCLRFieldGetter(field, get_err_6);
            app.RegisterCLRFieldSetter(field, set_err_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_err_6, AssignFromStack_err_6);
            field = type.GetField("version", flag);
            app.RegisterCLRFieldGetter(field, get_version_7);
            app.RegisterCLRFieldSetter(field, set_version_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_version_7, AssignFromStack_version_7);
            field = type.GetField("webRequest", flag);
            app.RegisterCLRFieldGetter(field, get_webRequest_8);
            app.RegisterCLRFieldSetter(field, set_webRequest_8);
            app.RegisterCLRFieldBinding(field, CopyToStack_webRequest_8, AssignFromStack_webRequest_8);
            field = type.GetField("OnDone", flag);
            app.RegisterCLRFieldGetter(field, get_OnDone_9);
            app.RegisterCLRFieldSetter(field, set_OnDone_9);
            app.RegisterCLRFieldBinding(field, CopyToStack_OnDone_9, AssignFromStack_OnDone_9);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Data.DownLoadMission());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Data.DownLoadMission[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_cmd_0(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).cmd;
        }

        static StackObject* CopyToStack_cmd_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).cmd;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_cmd_0(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).cmd = (System.String)v;
        }

        static StackObject* AssignFromStack_cmd_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @cmd = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.DownLoadMission)o).cmd = @cmd;
            return ptr_of_this_method;
        }

        static object get_DataContext_1(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).DataContext;
        }

        static StackObject* CopyToStack_DataContext_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).DataContext;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance, true);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true);
        }

        static void set_DataContext_1(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).DataContext = (System.Object)v;
        }

        static StackObject* AssignFromStack_DataContext_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Object @DataContext = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.DownLoadMission)o).DataContext = @DataContext;
            return ptr_of_this_method;
        }

        static object get_result_2(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).result;
        }

        static StackObject* CopyToStack_result_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).result;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_result_2(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).result = (System.Byte[])v;
        }

        static StackObject* AssignFromStack_result_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Byte[] @result = (System.Byte[])typeof(System.Byte[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.DownLoadMission)o).result = @result;
            return ptr_of_this_method;
        }

        static object get_type_3(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).type;
        }

        static StackObject* CopyToStack_type_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).type;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_type_3(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).type = (System.String)v;
        }

        static StackObject* AssignFromStack_type_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @type = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.DownLoadMission)o).type = @type;
            return ptr_of_this_method;
        }

        static object get_filename_4(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).filename;
        }

        static StackObject* CopyToStack_filename_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).filename;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_filename_4(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).filename = (System.String)v;
        }

        static StackObject* AssignFromStack_filename_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @filename = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.DownLoadMission)o).filename = @filename;
            return ptr_of_this_method;
        }

        static object get_url_5(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).url;
        }

        static StackObject* CopyToStack_url_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).url;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_url_5(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).url = (System.String)v;
        }

        static StackObject* AssignFromStack_url_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @url = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.DownLoadMission)o).url = @url;
            return ptr_of_this_method;
        }

        static object get_err_6(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).err;
        }

        static StackObject* CopyToStack_err_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).err;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_err_6(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).err = (System.Int32)v;
        }

        static StackObject* AssignFromStack_err_6(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @err = ptr_of_this_method->Value;
            ((huqiang.Data.DownLoadMission)o).err = @err;
            return ptr_of_this_method;
        }

        static object get_version_7(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).version;
        }

        static StackObject* CopyToStack_version_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).version;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_version_7(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).version = (System.Int32)v;
        }

        static StackObject* AssignFromStack_version_7(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @version = ptr_of_this_method->Value;
            ((huqiang.Data.DownLoadMission)o).version = @version;
            return ptr_of_this_method;
        }

        static object get_webRequest_8(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).webRequest;
        }

        static StackObject* CopyToStack_webRequest_8(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).webRequest;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_webRequest_8(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).webRequest = (UnityEngine.Networking.UnityWebRequest)v;
        }

        static StackObject* AssignFromStack_webRequest_8(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Networking.UnityWebRequest @webRequest = (UnityEngine.Networking.UnityWebRequest)typeof(UnityEngine.Networking.UnityWebRequest).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.DownLoadMission)o).webRequest = @webRequest;
            return ptr_of_this_method;
        }

        static object get_OnDone_9(ref object o)
        {
            return ((huqiang.Data.DownLoadMission)o).OnDone;
        }

        static StackObject* CopyToStack_OnDone_9(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.DownLoadMission)o).OnDone;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_OnDone_9(ref object o, object v)
        {
            ((huqiang.Data.DownLoadMission)o).OnDone = (System.Action<huqiang.Data.DownLoadMission>)v;
        }

        static StackObject* AssignFromStack_OnDone_9(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.Data.DownLoadMission> @OnDone = (System.Action<huqiang.Data.DownLoadMission>)typeof(System.Action<huqiang.Data.DownLoadMission>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.Data.DownLoadMission)o).OnDone = @OnDone;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Data.DownLoadMission();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
